import 'base_model.dart';

/// 简易键值实体
///
class SimpleKeyModel extends BaseModel {
  String key; // 键
  String label; // 名称
  String value; // 值

  SimpleKeyModel({this.key, this.label, this.value});

  SimpleKeyModel.fromJson(Map<String, dynamic> data) {
    key = data['key'];
    label = data['label'];
    value = data['value'];
  }

  @override
  Map<String, String> toJson() {
    return {
      'key': key,
      'label': label,
      'value': value,
    };
  }
}
